home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / amigaoscd / amigapluscd / AP-Website / links / out_frame.php < prev    next >
PHP Script  |  2001-07-30  |  1KB  |  57 lines

  1. <?
  2. // *******************************************************************
  3. //  out_frame.php
  4. // *******************************************************************
  5.  
  6. include("include/config.php");
  7. include("include/functions.php");
  8. include("include/common.php");
  9. $language = $gl["Language"];
  10. include("include/lang/$language.php");
  11. include("include/session.php");
  12. session_start();
  13.  
  14. if(isset($ID)){
  15.  
  16.     $get_site = sql_query("
  17.         select
  18.             SiteURL,
  19.             OutIP
  20.         from
  21.             $tb_links
  22.         where
  23.             ID = '$ID'
  24.     ");
  25.  
  26.     $get_row = sql_fetch_array($get_site);
  27.     $url = $get_row["SiteURL"];
  28. }
  29.  
  30. if($REMOTE_ADDR != $get_row["OutIP"]){
  31.     
  32.     $result = sql_query("
  33.         update
  34.             $tb_links
  35.         set
  36.             HitsOut = HitsOut + 1,
  37.             OutIP = '$REMOTE_ADDR',
  38.             LastUpdate = LastUpdate
  39.         where
  40.             ID = '$ID'
  41.     ");
  42. }
  43.  
  44. ?>
  45.  
  46. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
  47.     "DTD/xhtml1-frameset.dtd">
  48. <html>
  49.     <head>
  50.         <title>phpLinks - Outer Frame - </title>
  51.     </head>
  52.     <frameset border="0" frameborder="0" rows="100,*">
  53.         <frame name="top" src="top_frame.php?<?=session_name()?>=<?=session_id()?>" scrolling="no" marginwidth="10" marginheight="5" topmargin="5" leftmargin="10" />
  54.         <frame name="main" src="<?=$url?>" scrolling="auto" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" />
  55.     </frameset>
  56. </html>
  57.